package com.practice.mybatis.v1;

public class SqlSession {
	
	private Configuration configuration;
	
	private Executor execuotr;

	public SqlSession(Configuration configuration, Executor execuotr) {
		super();
		this.configuration = configuration;
		this.execuotr = execuotr;
	}
	
	public <T> T getMapper(Class<T> clazz) {
		return configuration.getMapper(clazz, this);
	}
	
	public <T> T selectOne(String statement, String parameter) {
		return execuotr.query(statement, parameter);
	}

}
